home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD-ROM Advisor
/
CD-ROM Advisor.iso
/
prodemo
/
pdymain.dir
/
00006_Script_6
< prev
next >
Wrap
Text File
|
1995-09-29
|
4KB
|
107 lines
on mouseDown
global gIndexOfCurrentButton
global gMouseDownInButton --TRUE means down was in a button...in case of rollout
global gIsMainButton, gIsSmallButton --TRUE if a mouseDown in a main/small button
global gChannelForHighLights
global gNumberOfMainButtons
global gCentersOfMainButtons, gMagicOffsetsOfMainButtons, gCastMemsOfMainButtons
global gCentersOfSmallButtons, gMagicOffsetsOfSmallButtons, gCastMemsOfSmallButtons
global gSmallButtonsOn
put the mouseH into hTemp
put the mouseV into vTemp
put isPositionWithinMainButton(hTemp, vTemp) into gIndexOfCurrentButton
if gIndexOfCurrentButton > 0 then
put TRUE into gMouseDownInButton
put TRUE into gIsMainButton
set the castNum of sprite gChannelForHighLights to getAt(gCastMemsOfMainButtons, gIndexOfCurrentButton)
--put "script 6, <enterFrame>, gMouseDownInButton = ", gMouseDownInButton
--put "script 6, <mouseDown>, gChannelForHighLights =", gChannelForHighLights
--put " the castNum of sprite gChannelForHighLights =", the castNum of sprite gChannelForHighLights
put getAt(gCentersOfMainButtons, gIndexOfCurrentButton) into centerTemp
put getAt(gMagicOffsetsOfMainButtons, gIndexOfCurrentButton) into offsetTemp
set the visible of sprite gChannelForHighLights to TRUE
set the ink of sprite gChannelForHighLights to 0
set the locH of sprite gChannelForHighLights to getAt(centerTemp, 1) + getAt(offsetTemp, 1)
set the locV of sprite gChannelForHighLights to getAt(centerTemp, 2) + getAt(offsetTemp, 2)
else
if gSmallButtonsOn then --only check the small buttons if the flag is TRUE
put isPositionWithinSmallButton(hTemp, vTemp) into gIndexOfCurrentButton
if gIndexOfCurrentButton > 0 then
put TRUE into gMouseDownInButton
put TRUE into gIsSmallButton
set the castNum of sprite gChannelForHighLights to getAt(gCastMemsOfSmallButtons, gIndexOfCurrentButton)
put getAt(gCentersOfSmallButtons, gIndexOfCurrentButton) into centerTemp
put getAt(gMagicOffsetsOfSmallButtons, gIndexOfCurrentButton) into offsetTemp
set the visible of sprite gChannelForHighLights to TRUE
set the ink of sprite gChannelForHighLights to 0
set the locH of sprite gChannelForHighLights to getAt(centerTemp, 1) + getAt(offsetTemp, 1)
set the locV of sprite gChannelForHighLights to getAt(centerTemp, 2) + getAt(offsetTemp, 2)
end if
end if
end if
end mouseDown
on mouseUp
global gIndexOfCurrentButton
global gMouseDownInButton
global gIsMainButton, gIsSmallButton
global gChannelForHighLights
global gNumberOfMainButtons
global gLabelsForSmallButtonActions
global gAnisForMainButtons, gAniHasBeenViewed
global gNextLabel
global gMovieToPlay
global gSmallButtonsOn
if gMouseDownInButton then
put the mouseH into hTemp
put the mouseV into vTemp
if gIsMainButton then
put isPositionWithinMainButton (hTemp, vTemp) into iButtonTemp
if iButtonTemp = gIndexOfCurrentButton then
setAt gAniHasBeenViewed, gIndexOfCurrentButton, TRUE
put TRUE into gMovieToPlay
put 0 into countOfViewed
repeat with iButCount = 1 to gNumberOfMainButtons
if getAt(gAniHasBeenViewed, iButCount) then
put (countOfViewed + 1) into countOfViewed
end if
end repeat
if countOfViewed < gNumberOfMainButtons then
put "cont" into gNextLabel
put TRUE into gSmallButtonsOn
else
put "conc" into gNextLabel
put TRUE into gSmallButtonsOn
end if
end if
else
if gSmallButtonsOn and gIsSmallButton then
put isPositionWithinSmallButton (hTemp, vTemp) into iButtonTemp
if iButtonTemp = gIndexOfCurrentButton then
put getAt(gLabelsForSmallButtonActions, gIndexOfCurrentButton) into gNextLabel
end if
end if
end if
end if
set the visible of sprite gChannelForHighLights to FALSE
--reset the Booleans
--don't reset <gMovieToPlay> because it tells <exitFrame> whether to run the movie
--don't reset <gIndexOfCurrentButton because it's needed to run the movie
put FALSE into gMouseDownInButton
put FALSE into gIsMainButton
put FALSE into gIsSmallButton
end mouseUp